Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added logic for junit output #70

Merged
merged 1 commit into from
Jan 9, 2025
Merged

fix: added logic for junit output #70

merged 1 commit into from
Jan 9, 2025

Conversation

yusufhm
Copy link
Contributor

@yusufhm yusufhm commented Jan 9, 2025

Since we've completely decoupled ResultList from the config package, additional logic was required to populate the policies in the new ResultList. Looks like that was never done, and that's fixed now.

$ shipshape run . -o junit
<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="29" errors="16">
    <testsuite name="drupal-db-permissions" tests="1" errors="1">
        <testcase name="[DATABASE] Disallowed permissions on active site" classname="[DATABASE] Disallowed permissions on active site">
            <error message="vendor/drush/drush/drush: no such file or directory"></error>
        </testcase>
    </testsuite>
    <testsuite name="drupal-user-forbidden" tests="1" errors="1">
        <testcase name="[DATABASE] Active User 1 check" classname="[DATABASE] Active User 1 check">
            <error message="vendor/drush/drush/drush: no such file or directory"></error>
        </testcase>
    </testsuite>
    <testsuite name="drush-yaml" tests="5" errors="5">
        <testcase name="[DATABASE] Validate active install profile" classname="[DATABASE] Validate active install profile">
            <error message="vendor/drush/drush/drush: no such file or directory"></error>
        </testcase>
        <testcase name="[DATABASE] Validate active TFA" classname="[DATABASE] Validate active TFA">
            <error message="vendor/drush/drush/drush: no such file or directory"></error>
        </testcase>
        <testcase name="[DATABASE] Ensure only admins can register accounts" classname="[DATABASE] Ensure only admins can register accounts">
            <error message="vendor/drush/drush/drush: no such file or directory"></error>
        </testcase>
        <testcase name="[DATABASE] Ensure CSS &amp; JS aggregations are enabled" classname="[DATABASE] Ensure CSS &amp; JS aggregations are enabled">
            <error message="vendor/drush/drush/drush: no such file or directory"></error>
        </testcase>
        <testcase name="[DATABASE] Ensure no error log displayed" classname="[DATABASE] Ensure no error log displayed">
            <error message="vendor/drush/drush/drush: no such file or directory"></error>
        </testcase>
    </testsuite>
    <testsuite name="drupal-db-module" tests="2" errors="2">
        <testcase name="[DATABASE] Active modules audit" classname="[DATABASE] Active modules audit">
            <error message="vendor/drush/drush/drush: no such file or directory"></error>
        </testcase>
        <testcase name="[DATABASE] Deprecated modules" classname="[DATABASE] Deprecated modules">
            <error message="vendor/drush/drush/drush: no such file or directory"></error>
        </testcase>
    </testsuite>
    <testsuite name="file" tests="3" errors="3">
        <testcase name="[FILE] Illegal files" classname="[FILE] Illegal files">
            <error message="[error finding files] lstat web: no such file or directory"></error>
        </testcase>
        <testcase name="[FILE] Executable files" classname="[FILE] Executable files">
            <error message="illegal files found:&#xA;        - .docker/export-container.sh&#xA;        - process.sh&#xA;        - yusuf-local/test-before-script.sh&#xA;        - yusuf-local/test-single-backup.sh"></error>
        </testcase>
        <testcase name="[FILE] Sensitive public files" classname="[FILE] Sensitive public files">
            <error message="[error finding files] lstat web/sites/default/files: no such file or directory"></error>
        </testcase>
    </testsuite>
    <testsuite name="phpstan" tests="2" errors="0">
        <testcase name="[FILE] Banned PHP function list" classname="[FILE] Banned PHP function list"></testcase>
        <testcase name="[FILE] Banned PHP methods and classes" classname="[FILE] Banned PHP methods and classes"></testcase>
    </testsuite>
    <testsuite name="yaml" tests="8" errors="0">
        <testcase name="[FILE] Validate install profile" classname="[FILE] Validate install profile"></testcase>
        <testcase name="[FILE] Disallowed permissions" classname="[FILE] Disallowed permissions"></testcase>
        <testcase name="[FILE] Disallowed permissions for anonymous role" classname="[FILE] Disallowed permissions for anonymous role"></testcase>
        <testcase name="[FILE] Validate TFA config" classname="[FILE] Validate TFA config"></testcase>
        <testcase name="[FILE] Ensure only admins can register accounts" classname="[FILE] Ensure only admins can register accounts"></testcase>
        <testcase name="[FILE] Ensure CSS &amp; JS aggregations are enabled" classname="[FILE] Ensure CSS &amp; JS aggregations are enabled"></testcase>
        <testcase name="[FILE] Ensure no error log displayed" classname="[FILE] Ensure no error log displayed"></testcase>
        <testcase name="[FILE] Detect module files in theme folder" classname="[FILE] Detect module files in theme folder"></testcase>
    </testsuite>
    <testsuite name="yamllint" tests="3" errors="0">
        <testcase name="[FILE] Yaml lint platform files" classname="[FILE] Yaml lint platform files"></testcase>
        <testcase name="[FILE] Yaml lint theme files" classname="[FILE] Yaml lint theme files"></testcase>
        <testcase name="[FILE] Yaml lint theme files (no web prefix)" classname="[FILE] Yaml lint theme files (no web prefix)"></testcase>
    </testsuite>
    <testsuite name="drupal-file-module" tests="2" errors="0">
        <testcase name="[FILE] Verify enabled modules" classname="[FILE] Verify enabled modules"></testcase>
        <testcase name="[FILE] Deprecated modules" classname="[FILE] Deprecated modules"></testcase>
    </testsuite>
    <testsuite name="drupal-role-permissions" tests="1" errors="2">
        <testcase name="[DATABASE] Authenticated role check" classname="[DATABASE] Authenticated role check">
            <error message="vendor/drush/drush/drush: no such file or directory"></error>
            <error message="[role:authenticated] missing permissions: [setup own tfa]"></error>
        </testcase>
    </testsuite>
    <testsuite name="drupal-admin-user" tests="1" errors="2">
        <testcase name="[DATABASE] Active user roles admin check" classname="[DATABASE] Active user roles admin check">
            <error message="vendor/drush/drush/drush: no such file or directory"></error>
            <error message="no data available"></error>
        </testcase>
    </testsuite>
</testsuites>

@yusufhm yusufhm self-assigned this Jan 9, 2025
@yusufhm yusufhm merged commit 9ef0a94 into 1.x Jan 9, 2025
3 checks passed
@yusufhm yusufhm deleted the bugfix/junit-output branch January 9, 2025 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants